<template>
    <div>
        <div v-if="typeData == 'input'">
            <a-row>
                <a-col :span="2" style="line-height: 30px;">
                    {{nameData}}
                </a-col>
                <a-col :span="12">
                    <a-input placeholder="请输入" />
                </a-col>
            </a-row>
        </div>
        <div v-if="typeData == 'text'">
            <a-row>
                <a-col :span="2" style="line-height: 30px;">
                    {{nameData}}
                </a-col>
                <a-col :span="12">
                    <a-textarea placeholder="请输入" :rows="4" />
                </a-col>
            </a-row>
        </div>
        <div v-if="typeData == 'time'">
            <a-row>
                <a-col :span="2" style="line-height: 30px;">
                    {{nameData}}
                </a-col>
                <a-col :span="12">
                    <a-time-picker :locale="$locale" use12-hours />
                </a-col>
            </a-row>
        </div>
        <div v-if="typeData == 'date'">
            <a-row>
                <a-col :span="2" style="line-height: 30px;">
                    {{nameData}}
                </a-col>
                <a-col :span="12">
                    <a-date-picker :locale="$locale" />
                </a-col>
            </a-row>
        </div>
        <div v-if="typeData == 'file'">
            <a-row>
                <a-col :span="2" style="line-height: 30px;color: #000;">{{nameData}}</a-col>
                <a-col :span="12" style="display: flex;">
                    <a-upload name="file">
                        <a-button style="margin-top: -10px;"> <a-icon type="upload" /> 上传文件 </a-button>
                    </a-upload>
                </a-col>
            </a-row>
        </div>
        <div v-if="typeData == 'img'">
            <a-row>
                <a-col :span="2" style="line-height: 30px;color: #000;">{{nameData}}</a-col>
                <a-col :span="12" style="display: flex;">
                    <a-upload name="file" list-type="picture-card">
                        <a-icon type="plus" />
                        <div class="ant-upload-text">
                            上传图片
                        </div>
                    </a-upload>
                </a-col>
            </a-row>
        </div>
    </div>
</template>

<script>
    export default {
        props: ['typeData', 'nameData']
    };
</script>
<style scoped>
    .ant-row {
        margin: 20px;
    }
</style>